package com.tdtxdcxm.hellowebview.webconfig;

import ohos.agp.components.webengine.ResourceRequest;
import ohos.agp.components.webengine.WebView;

public class StartWebView {

    public static Boolean setwebviewstatus = false;

    public static void startWebview(WebView webView,String url){

        webView.getWebConfig().setJavaScriptPermit(true);

        SetWebAgent setWebAgent = new SetWebAgent(url);
        ResourceRequest request = null;
        setWebAgent.isNeedLoadUrl(webView,request);
        webView.setWebAgent(setWebAgent);


        setwebviewstatus = true;

    }
}
